package com.application.merecipe.server;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

import com.sql.database.IConnectionFactory;

public class MySqlConnectionFactory implements IConnectionFactory {

	@Override
	public Connection createConnection() {
		Connection con = null;
		try {
			Class.forName("com.mysql.jdbc.Driver");

			String url = "jdbc:mysql://localhost:3306/merecipe";

			con = DriverManager.getConnection(url, "root", "my4sql");
		} catch (SQLException e) {
			e.printStackTrace();
		} catch (ClassNotFoundException e) {
			e.printStackTrace();
		}
		return con;
	}

}
